{template 'member', 'header'}
<script type="text/javascript">
<!--
	var charset = '{CHARSET}';
	
		function selectcity(val,sel){
			var area = $('#area').val();
			
			$.post("index.php?m=member&c=index&a=getarea", {
				id:val,
				sel:sel
			}, function(data) {
				var d = '<select name="info[area]">'+data.str+'</select>';
				$('#city_letter').val(data.letter);
				$('#area').html("");
				$('#area').html(d);
				
			},"json"
			);
		}
		function select_decoration(val,sel){
			var house_type = $('#house_type').val();
			$.post("index.php?m=member&c=index&a=select_decoration", {
				id:val,
				sel:sel
			}, function(data) {
				if(data.str=='null'){
					var d = '<select disabled="disabled"  name="info[house_type]"><option>请选择</option></select>';
				}
				else{
					var d = '<select   name="info[house_type]">'+data.str+'</select>';
				}
				$('#city_letter').val(data.letter);
				$('#house_type').html("");
				$('#house_type').html(d);
				
			},"json"
			);
		}
//-->
</script>
<link href="{CSS_PATH}table_form.css" rel="stylesheet" type="text/css" />
<link href="{CSS_PATH}dialog.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="{JS_PATH}dialog.js"></script>
<script language="javascript" type="text/javascript" src="{JS_PATH}content_addtop.js"></script>
<div id="main-content">
<div id="memberArea">
	{template 'member', 'left'}
  <div class="right">
<div class="hd">
  <h3 class="t04"><strong>管理案例</strong> >><a href="#">添加案例</a></h3>

</div>
<div class="bd01"><font class="span05"><img src="{CSS_PATH}images/h_02.gif" />排序用于在公司展示平台案例排序；排序数值越大的案例越靠前</font>
  
</div>

	<style type="text/css">
.measure-input{width:120px!important;
 border: 1px solid #CECECE;
    height: 20px;
    line-height: 20px;
}
.input-text{width:120px!important;
 border: 1px solid #CECECE;
    height: 20px;
    line-height: 20px;
}
#keywords{width:120px!important;}
</style>
<div class="hd01">
<ul>
<li><a href="index.php?m=member&c=content&a=published&catid=24">管理案例</a></li>
<li><a href="index.php?m=member&c=content&a=publish&siteid=1&catid=24" class="hover">添加案例</a></li></ul>
</div>
<form method="post" action="" id="myform" name="myform">
<table class="table02">
					<tbody>

					{if ROUTE_A=='publish'}
				<script language="JavaScript">
				<!--
					function c_c(catid) {
						location.href='index.php?m=member&c=content&a=publish&siteid={$siteid}&catid='+catid;
					}
				//-->
				</script>
					<tr style="display:none">
						<th>{L('please_select_cat')}</th>
						<td>{form::select_category('category_content', $catid, 'name="info[catid]" onchange="javascript:c_c(this.value);"','','',0,1,$siteid)}</td>
					</tr>
				{/if}
					{loop $forminfos $k $v}
					<tr>
						<th width="100">{if $v['star']} <font color="red">*</font>{/if} {$v['name']}：</th> 
						<td>{$v['form']}{if $v['tips']}{$v['tips']}{/if}</td>
					</tr>
					{/loop}
					<tr>
					
					
					<tr><th></th>
					
					<td>
					<input name="forward" type="hidden" value="{HTTP_REFERER}">
						<input name="id" type="hidden" value="{$id}">
					<input name="dosubmit" type="submit" value="保存" class="h_bottom03" />
					</td></tr>
					</tbody>
					
				</table>
				</form>
				<span class="span032"><strong>案例发布说明：</strong><br />&nbsp;&nbsp;&nbsp;&nbsp;1、建议为案例添加详细说明，比如设计
师思路，业主满意情况，施工工期等信息，
建议为每张案例选择空间类型。<br />
&nbsp;&nbsp;&nbsp;&nbsp;2、本站将加大对案例图片审核力度，案例图
片通过审核后才给积分。<br /> 

&nbsp;&nbsp;&nbsp;&nbsp;3、案例发布积分规则：每张图片一分，但同
一套案例积分最多不超过25分，不能发布相
同案例和相同的图片，不能发布看不清楚，
图片太小，或与装饰无关图片，一旦发现会
被管理员删除，删除时扣双倍的积分。</span>



</div>
</div>
</div>
</body>
</html>
  
<div class="clear"></div>
<script type="text/javascript"> 
<!--
//只能放到最下面
$(function(){
	$.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'}, 	function(){$(obj).focus();
	boxid = $(obj).attr('id');
	if($('#'+boxid).attr('boxid')!=undefined) {
		check_content(boxid);
	}
	})}});
	{$formValidator}
})
{pc:member action="get_city"  return="city"}
	var c = '<select name="info[city]"  onchange="selectcity(this.value);">';
	c +='<option value="0">请选择</option>';
	{loop $city $k $v}
		c += '<option {if $data["city"]==$v["linkageid"]}selected="selected"{/if} value="{$v['linkageid']}">{$v['name']}</option>';
	{/loop}
	c += '</select>';
{/pc}
$('#citydiv').html(c);
	{pc:member action="get_decoration_space"  return="city"}
	var c = '<select name="info[decoration_space]"  onchange="select_decoration(this.value);">';
	c +='<option value="0">请选择</option>';
	{loop $city $k $v}
		c += '<option {if $data["decoration_space"]==$v["linkageid"]}selected="selected"{/if} value="{$v['linkageid']}">{$v['name']}</option>';
	{/loop}
	c += '</select>';
	{/pc}
	$('#decoration_space').html(c);
	
	{pc:member action="get_decoration_style"  return="dstyle"}
	var c = '<select name="info[decoration_style]" >';
	c +='<option value="0">请选择</option>';
	{loop $dstyle $k $v}
		c += '<option {if $data["decoration_style"]==$v["linkageid"]}selected="selected"{/if} value="{$v['linkageid']}">{$v['name']}</option>';
		
		{/loop}
	c += '</select>';
	{/pc}
		$('#decoration_style').html(c);
	
	{if $_GET['a']=='edit'}
	selectcity({$data['city']}, {$data['area']});
	select_decoration({$data['decoration_space']},{$data['house_type']});
	{/if}
//-->
</script>
